package com.bestv.engine.sorter;

import com.bestv.engine.model.RecommendationItem;

import java.util.List;

/**
 * Created by Henry on 14-7-23.
 */
public class ChargeSorter implements Sorter {
    @Override
    public void sort(List<RecommendationItem> recommendationItemList) {
        for (int i=0; i<recommendationItemList.size(); i++) {
            if (recommendationItemList.get(i).isCharge()) {
                RecommendationItem item = recommendationItemList.remove(i);
                recommendationItemList.add(0, item);
                break;
            }
        }
    }
}
